package com.ruoyi.project.museum.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.project.museum.domain.BaseEntity;

import java.time.LocalDateTime;

/**
 * 此模块所有service的父类
 *
 * @author G. Seinfeld
 * @since 2021/02/25
 */
public class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseEntity> extends ServiceImpl<M, T> implements IBaseService<T> {

    @Override
    public boolean updateById(T entity) {
        entity.setUpdatedTime(LocalDateTime.now());
        return super.updateById(entity);
    }
}
